<div class="form__wrapper">
  <div class="card pt-4">
    <div class="card-section">
      <div class="row column">
        <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
      </div>

      <div class="row column">
        <%= form.translated :editor, :description, resource_mentionable: true, aria: { label: :description } %>
      </div>

      <div class="row column">
        <%= form.select :type_of_meeting,
                        @form.type_of_meeting_select,
                        { include_blank: t(".select_a_meeting_type") },
                        { multiple: false } %>
      </div>

      <div class="row column" data-meeting-type="in_person">
        <%= form.geocoding_field :address, help_text: t(".address_help") %>
      </div>

      <div class="row column" data-meeting-type="in_person">
        <%= form.translated :text_area, :location, help_text: t(".location_help") %>
      </div>

      <div class="row column">
        <%= form.translated :text_area, :location_hints, help_text: t(".location_hints_help") %>
      </div>

      <div class="row column" data-meeting-type="online">
        <%= form.text_field :online_meeting_url, help_text: t(".online_meeting_url_help") %>
      </div>

      <div class="iframe-fields">
        <div class="row column iframe-fields--embed-type" id="meeting_iframe_embed_type" data-meeting-type="online">
          <%= form.select :iframe_embed_type,
                          @form.iframe_embed_type_select,
                          {
                            multiple: false,
                            help_text: t(".iframe_embed_type_html", domains: Decidim::Meetings.embeddable_services&.join(" "))
                          } %>
        </div>

        <div class="row column iframe-fields--access-level" data-meeting-type="online-access-level">
          <%= form.select :iframe_access_level,
                          @form.iframe_access_level_select,
                          { include_blank: t(".select_an_iframe_access_level") },
                          { multiple: false } %>
        </div>
      </div>

      <div class="row">
        <div class="columns">
          <%= form.datetime_field :start_time %>
        </div>

        <div class="columns">
          <%= form.datetime_field :end_time %>
        </div>
      </div>

      <% if @form.taxonomy_filters&.any? %>
        <% @form.taxonomy_filters.each do |filter| %>
          <div class="row column">
            <%= filter_taxonomy_items_select_field form, :taxonomies, filter %>
          </div>
        <% end %>
      <% end %>

      <div class="row column">
        <%= form.select :registration_type,
                        @form.registration_type_select,
                        { include_blank: t(".select_a_registration_type") },
                        { multiple: false } %>
      </div>

      <div class="row column" id="meeting_registration_url">
        <%= form.text_field :registration_url, help_text: t(".registration_url_help") %>
        <%= cell("decidim/announcement", t(".disclaimer", organization: organization_name(current_component.organization)), callout_class: "alert" ) %>
      </div>

      <div class="row column" id="private_meeting">
        <%= form.check_box :private_meeting %>
      </div>

      <div class="row column" id="transparent">
        <%= form.check_box :transparent %>
      </div>

      <%= render partial: "decidim/comments/admin/shared/availability_fields", locals: { form: } %>
    </div>
  </div>
  <%= render "decidim/meetings/admin/meetings/reminders", form: %>
  <%= render "decidim/meetings/admin/meetings/services", form: , id: tabs_id_for_service(blank_service) %>
  <%= render "decidim/meetings/admin/meetings/linked_spaces", form: %>
</div>

<%= append_javascript_pack_tag "decidim_meetings_admin" %>
